package com.fozu.office.sale.service;
/*
 * 机会管理
 */
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fozu.office.sale.dao.ChanceDao;
import com.fozu.office.sale.entity.ChanceVO;
import com.fozu.office.sale.entity.PlanVO;
@Service("chanceSevice")
@Transactional(readOnly=true)
public class ChanceServiceImpl {
	@Autowired
	private ChanceDao cdao;
	//机会列表(分页)
	public IPage<ChanceVO> listChance(Page<ChanceVO> age,ChanceVO chance ){
		return cdao.listChance(age,chance);
	}
	
	//根据id拿对象
	public ChanceVO getChanceById(ChanceVO chance){
		return cdao.getChanceById(chance);
	}
	//修改
	@Transactional(readOnly=false)
	public void updateChance(ChanceVO chance){
		cdao.updateChance(chance);
	}
	//添加
	@Transactional(readOnly=false)
	public void addChance(ChanceVO chance){
		cdao.addChance(chance);
	}
	//分配
	@Transactional(readOnly=false)
	public void distribut(ChanceVO chance){
		cdao.distribut(chance);
	}
}
